import Vue from "vue";
import App from "./App";
import store from "./store";
import router from "./router";
import "./plugins";
import * as socketApi from './utils/socket'
Vue.prototype.socketApi = socketApi

/**
 *
 * @description 生产环境与演示环境默认都使用mock，如果正式用于生产环境时，记得去掉
 */

// if (
//   process.env.NODE_ENV === "preview" ||
//   process.env.NODE_ENV === "production"
// ) {
//   const { mockXHR } = require("@/config/static");
//   mockXHR();
// }
import permission from './directive/permission'
import preventReClick from './api/plugins'

Vue.use(permission)
Vue.use(preventReClick)
Vue.config.productionTip = false;

new Vue({
  el: "#vue-admin-beautiful",
  router,
  store,

  render: (h) => h(App),
});
